<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="${request.contextPath}/statics/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/bower_components/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/bower_components/Ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/dist/css/skins/_all-skins.min.css">
    <link rel="stylesheet"
          href="${request.contextPath}/statics/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission("work:artical:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>
            <#if shiro.hasPermission("work:artical:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
            <#if shiro.hasPermission("work:artical:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
</div>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">标题</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="artical.title" placeholder=""/>
            </div>
        </div>
        <div class="col-sm-2 control-label">内容</div>
        <div class="col-sm-10">
            <textarea class="form-control" rows="3" v-model="artical.content" placeholder="Enter ..."></textarea>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">点赞数</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="artical.liked" placeholder="" disabled="disabled"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">浏览量</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="artical.looked" placeholder="" disabled="disabled"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">评论量</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="artical.message" placeholder="" disabled="disabled"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">创建人</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="artical.author" placeholder=""/>
            </div>
        </div>
        <div class="form-group" style="margin-top: 350px">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>
<style type="text/css">
    .contentsss {
        height: 500px;
    }
</style>
<script src="${request.contextPath}/statics/js/modules/work/artical.js?_${.now?long}"></script>
<!-- Bootstrap 3.3.7 -->
<script src="${request.contextPath}/statics/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="${request.contextPath}/statics/bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="${request.contextPath}/statics/dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="${request.contextPath}/statics/dist/js/demo.js"></script>
<!-- FastClick -->
<script src="${request.contextPath}/statics/dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="${request.contextPath}/statics/dist/js/demo.js"></script>
<!-- CK Editor -->
<script src="${request.contextPath}/statics/bower_components/ckeditor/ckeditor.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="${request.contextPath}/statics/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>

</body>
</html>
